#!/bin/sh

PREFIX=/opt/qemu-client
export PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig:$PREFIX/lib64/pkgconfig:$PREFIX/share/pkgconfig
export LD_LIBRARY_PATH=$PREFIX/lib:$PREFIX/lib64
export LD_INCLUDE_PATH=$PREFIX/include
export PATH=$PREFIX/bin:$PATH
chmod +x configure
chmod +x ./spice-common/spice_codegen.py
chmod +x  ./gtk/keymap-gen.pl 
touch spice-common/common/generated_*
touch spice-common/spice-protocol/spice/enums.h
./configure --prefix=$PREFIX --with-gtk=2.0 --with-x11 --enable-vala --enable-usbredir=yes --enable-smartcard=yes --enable-webdav=no --enable-lz4=yes --with-coroutine=gthread
make clean
make -j4
